<?php
/*
// $sql = "select a.goods_name,a.goods_id,a.shop_price,a.market_price,a.cat_id,b.parent_id_path,b.name from __PREFIX__goods as a left join ";
// $sql .= " __PREFIX__goods_category as b on a.cat_id=b.id where a.is_hot=1 and a.is_on_sale=1 order by a.sort";//二级分类下热卖商品
 */
namespace Home\Controller;
use Think\Page;
use Think\Verify;
class AdultController extends BaseController {

  public function balabala(){
    $article=M()->query("select `title`,`id` from __PREFIX__article_xueli order by `id` desc");
    $this->assign("article",$article);
    $this->display();
  }

    public function index(){

        // 如果是手机跳转到 手机模块
        if(true == isMobile()){
            header("Location: ".U('Mobile/Index/index'));
        }

//area
        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);

//header
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);

        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

//index
        $sql4 = "select * from __PREFIX__fourth_column where `second_column_id` = 4 and `display` = 1 order by `order`,`id` desc";
        $fourth_column = M()->query($sql4);

        $sql5 = "select * from __PREFIX__article_xueli where `third_column_id` = 4 and `display` = 1 order by `order`,`id` desc limit 5";
        $school_news = M()->query($sql5);

        $management_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 5 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $management_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 5 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $management_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 5 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $management_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 5 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $management_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 5 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $literature_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 6 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $literature_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 6 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $literature_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 6 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $literature_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 6 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $literature_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 6 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $polytechnic_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 7 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $polytechnic_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 7 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $polytechnic_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 7 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $polytechnic_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 7 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $polytechnic_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 7 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $education_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 8 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $education_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 8 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $education_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 8 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $education_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 8 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $education_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 8 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $medicine_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 9 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $medicine_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 9 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $medicine_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 9 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $medicine_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 9 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $medicine_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 9 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $agronomy_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 10 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $agronomy_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 10 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $agronomy_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 10 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $agronomy_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 10 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $agronomy_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 10 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $ary_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 11 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $ary_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 11 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $ary_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 11 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $ary_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 11 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $ary_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 11 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $high_chinese_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 19 and `display` =1 order by `order`,`id` desc limit 7 ");
        $high_chinese_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 19 and `display` =1 order by `order`,`id` desc limit 5 ");

        $high_english_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 20 and `display` =1 order by `order`,`id` desc limit 7 ");
        $high_english_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 23 and `display` =1 order by `order`,`id` desc limit 5 ");

        $high_math_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 21 and `display` =1 order by `order`,`id` desc limit 7 ");
        $high_math_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 27 and `display` =1 order by `order`,`id` desc limit 5 ");

        $high_wuhua_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 22 and `display` =1 order by `order`,`id` desc limit 7 ");
        $high_wuhua_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 31 and `display` =1 order by `order`,`id` desc limit 5 ");

        $high_shidi_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 23 and `display` =1 order by `order`,`id` desc limit 7 ");
        $high_shidi_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 35 and `display` =1 order by `order`,`id` desc limit 5 ");

        $high_eri_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 24 and `display` =1 order by `order`,`id` desc limit 7 ");
        $high_eri_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 39 and `display` =1 order by `order`,`id` desc limit 5 ");

//zsb
        $up_chinese_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 25 and `display` =1 order by `order`,`id` desc limit 7 ");
        $up_chinese_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 43 and `display` =1 order by `order`,`id` desc limit 5 ");

        $up_english_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 26 and `display` =1 order by `order`,`id` desc limit 7 ");
        $up_english_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 47 and `display` =1 order by `order`,`id` desc limit 5 ");

        $up_math_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 27 and `display` =1 order by `order`,`id` desc limit 7 ");
        $up_math_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 51 and `display` =1 order by `order`,`id` desc limit 5 ");

        $up_politics_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 28 and `display` =1 order by `order`,`id` desc limit 7 ");
        $up_politics_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 55 and `display` =1 order by `order`,`id` desc limit 5 ");

        $up_art_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 29 and `display` =1 order by `order`,`id` desc limit 7 ");
        $up_art_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 59 and `display` =1 order by `order`,`id` desc limit 5 ");

        $up_ecology_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 30 and `display` =1 order by `order`,`id` desc limit 7 ");
        $up_ecology_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 63 and `display` =1 order by `order`,`id` desc limit 5 ");

        $up_law_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 31 and `display` =1 order by `order`,`id` desc limit 7 ");
        $up_law_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 67 and `display` =1 order by `order`,`id` desc limit 5 ");

        $up_education_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 32 and `display` =1 order by `order`,`id` desc limit 7 ");
        $up_education_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 71 and `display` =1 order by `order`,`id` desc limit 5 ");

        $up_medical_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 33 and `display` =1 order by `order`,`id` desc limit 7 ");
        $up_medical_two=M()->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 75 and `display` =1 order by `order`,`id` desc limit 5 ");

        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('fourth_column',$fourth_column);
        $this->assign('school_news',$school_news);

        $this->assign('management_one',$management_one);
        $this->assign('management_two',$management_two);
        $this->assign('management_three',$management_three);
        $this->assign('management_four',$management_four);
        $this->assign('management_five',$management_five);

        $this->assign('literature_one',$literature_one);
        $this->assign('literature_two',$literature_two);
        $this->assign('literature_three',$literature_three);
        $this->assign('literature_four',$literature_four);
        $this->assign('literature_five',$literature_five);

        $this->assign('polytechnic_one',$polytechnic_one);
        $this->assign('polytechnic_two',$polytechnic_two);
        $this->assign('polytechnic_three',$polytechnic_three);
        $this->assign('polytechnic_four',$polytechnic_four);
        $this->assign('polytechnic_five',$polytechnic_five);

        $this->assign('education_one',$education_one);
        $this->assign('education_two',$education_two);
        $this->assign('education_three',$education_three);
        $this->assign('education_four',$education_four);
        $this->assign('education_five',$education_five);

        $this->assign('medicine_one',$medicine_one);
        $this->assign('medicine_two',$medicine_two);
        $this->assign('medicine_three',$medicine_three);
        $this->assign('medicine_four',$medicine_four);
        $this->assign('medicine_five',$medicine_five);

        $this->assign('agronomy_one',$agronomy_one);
        $this->assign('agronomy_two',$agronomy_two);
        $this->assign('agronomy_three',$agronomy_three);
        $this->assign('agronomy_four',$agronomy_four);
        $this->assign('agronomy_five',$agronomy_five);

        $this->assign('ary_one',$ary_one);
        $this->assign('ary_two',$ary_two);
        $this->assign('ary_three',$ary_three);
        $this->assign('ary_four',$ary_four);
        $this->assign('ary_five',$ary_five);

        $this->assign('high_chinese_one',$high_chinese_one);
        $this->assign('high_chinese_two',$high_chinese_two);

        $this->assign('high_english_one',$high_english_one);
        $this->assign('high_english_two',$high_english_two);

        $this->assign('high_math_one',$high_math_one);
        $this->assign('high_math_two',$high_math_two);

        $this->assign('high_wuhua_one',$high_wuhua_one);
        $this->assign('high_wuhua_two',$high_wuhua_two);

        $this->assign('high_shidi_one',$high_shidi_one);
        $this->assign('high_shidi_two',$high_shidi_two);

        $this->assign('high_eri_one',$high_eri_one);
        $this->assign('high_eri_two',$high_eri_two);

        $this->assign('up_chinese_one',$up_chinese_one);
        $this->assign('up_chinese_two',$up_chinese_two);

        $this->assign('up_english_one',$up_english_one);
        $this->assign('up_english_two',$up_english_two);

        $this->assign('up_math_one',$up_math_one);
        $this->assign('up_math_two',$up_math_two);

        $this->assign('up_politics_one',$up_politics_one);
        $this->assign('up_politics_two',$up_politics_two);

        $this->assign('up_art_one',$up_art_one);
        $this->assign('up_art_two',$up_art_two);

        $this->assign('up_ecology_one',$up_ecology_one);
        $this->assign('up_ecology_two',$up_ecology_two);

        $this->assign('up_law_one',$up_law_one);
        $this->assign('up_law_two',$up_law_two);

        $this->assign('up_education_one',$up_education_one);
        $this->assign('up_education_two',$up_education_two);

        $this->assign('up_medical_one',$up_medical_one);
        $this->assign('up_medical_two',$up_medical_two);

        $adult_news_one=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 1 order by `order`,`id` desc limit 5");
        $adult_news_two=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 1 order by `order`,`id` desc limit 5,5");

        $this->assign('adult_news_one',$adult_news_one);
        $this->assign('adult_news_two',$adult_news_two);

        $index_top_one=M()->query("select * from __PREFIX__article_xueli where `position` = 4 and `top` = 3 order by `order`,`id` desc limit 2");
        $index_top_two=M()->query("select * from __PREFIX__article_xueli where `position` = 3 and `top` = 3 order by `order`,`id` desc limit 2");
        $index_top_three=M()->query("select * from __PREFIX__article_xueli where `position` = 2 and `top` = 3 order by `order`,`id` desc limit 2");
        $index_top_four=M()->query("select * from __PREFIX__article_xueli where `position` = 1 and `top` = 3 order by `order`,`id` desc limit 2");
        $this->assign('index_top_one',$index_top_one);
        $this->assign('index_top_two',$index_top_two);
        $this->assign('index_top_three',$index_top_three);
        $this->assign('index_top_four',$index_top_four);

        $index_top_sm_one_one=M()->query("select * from __PREFIX__article_xueli where `position` = 4 and `top` = 2 order by `order`,`id` desc limit 3");
        $index_top_sm_one_two=M()->query("select * from __PREFIX__article_xueli where `position` = 4 and `top` = 2 order by `order`,`id` desc limit 3,3");
        $index_top_sm_two_one=M()->query("select * from __PREFIX__article_xueli where `position` = 3 and `top` = 2 order by `order`,`id` desc limit 3");
        $index_top_sm_two_two=M()->query("select * from __PREFIX__article_xueli where `position` = 3 and `top` = 2 order by `order`,`id` desc limit 3,3");
        $index_top_sm_three_one=M()->query("select * from __PREFIX__article_xueli where `position` = 2 and `top` = 2 order by `order`,`id` desc limit 3");
        $index_top_sm_three_two=M()->query("select * from __PREFIX__article_xueli where `position` = 2 and `top` = 2 order by `order`,`id` desc limit 3,3");
        $index_top_sm_four_one=M()->query("select * from __PREFIX__article_xueli where `position` = 1 and `top` = 2 order by `order`,`id` desc limit 3");
        $index_top_sm_four_two=M()->query("select * from __PREFIX__article_xueli where `position` = 1 and `top` = 2 order by `order`,`id` desc limit 3,3");
        $this->assign('index_top_sm_one_one',$index_top_sm_one_one);
        $this->assign('index_top_sm_one_two',$index_top_sm_one_two);
        $this->assign('index_top_sm_two_one',$index_top_sm_two_one);
        $this->assign('index_top_sm_two_two',$index_top_sm_two_two);
        $this->assign('index_top_sm_three_one',$index_top_sm_three_one);
        $this->assign('index_top_sm_three_two',$index_top_sm_three_two);
        $this->assign('index_top_sm_four_one',$index_top_sm_four_one);
        $this->assign('index_top_sm_four_two',$index_top_sm_four_two);

        $this->display();
    }

    public function common(){
        if(isset($_GET['id']) && $_GET['id'] != ''){
          $third_column_id=$_GET['id'];

          $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
          $province = M()->query($sql1);
          $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
          $second_column = M()->query($sql2);
          $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
          $third_column = M()->query($sql3);

          $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
          $size = empty($_REQUEST['size']) ? 8 : $_REQUEST['size'];
          $where = " 1 = 1 ";
          $where.=" and third_column_id='$third_column_id'";
          $article=M('article_xueli');
          $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
          $count = $article->where($where)->count();
          $pager = new \Think\Page($count,$size);
          $page = $pager->show();

          $right_two=$article->query("select * from __PREFIX__article_xueli where `third_column_id` = '1' order by `order`,`id` desc limit 10");

          $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");
          $second_column_id=$third_column_name[0]['second_column_id'];
          $second_column_name=M()->query("select * from __PREFIX__second_column where `id` = '$second_column_id'");

          $this->assign('province',$province);
          $this->assign('second_column',$second_column);
          $this->assign('third_column',$third_column);
          $this->assign('page',$page);
          $this->assign('article',$res);
          $this->assign('right_two',$right_two);
          $this->assign('third_column_name',$third_column_name);
          $this->assign('second_column_name',$second_column_name);
          $this->display();
        }else{
          echo "getting information failure"."<br/>";
        }
    }

    public function article_detail(){
      $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
      $province = M()->query($sql1);
      $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $second_column = M()->query($sql2);
      $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $third_column = M()->query($sql3);
      $article=M('article_xueli');
      $right_two=$article->query("select * from __PREFIX__article_xueli where `third_column_id` = '1' order by `order`,`id` desc limit 10");

      if(isset($_GET['id']) && $_GET['id'] != ''){
        $article_id=$_GET['id'];
        $select_article=$article->query("select * from __PREFIX__article_xueli where `id` = '$article_id'");
        $select_article=$select_article[0];
        $first_column_id=$select_article['first_column_id'];
        $second_column_id=$select_article['second_column_id'];
        $third_column_id=$select_article['third_column_id'];
        $fourth_column_id=$select_article['fourth_column_id'];
        $first_column_name=M()->query("select * from __PREFIX__first_column where `id` = '$first_column_id'");
        $second_column_name=M()->query("select * from __PREFIX__second_column where `id` = '$second_column_id'");
        $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");
        $fourth_column_name=M()->query("select * from __PREFIX__fourth_column where `id` = '$fourth_column_id'");
      }
      $this->assign('province',$province);
      $this->assign('second_column',$second_column);
      $this->assign('third_column',$third_column);
      $this->assign('right_two',$right_two);
      $this->assign('select_article',$select_article);
      $this->assign('first_column_name',$first_column_name);
      $this->assign('second_column_name',$second_column_name);
      $this->assign('third_column_name',$third_column_name);
      $this->assign('fourth_column_name',$fourth_column_name);
      $this->display();
    }

    public function fractional_line(){
      $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
      $province = M()->query($sql1);
      $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $second_column = M()->query($sql2);
      $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $third_column = M()->query($sql3);

      $article_official=M()->query("select * from __PREFIX__article_xueli where `keywords` like '%官方查询入口%'");
      $article_this_year=M()->query("select * from __PREFIX__article_xueli where `keywords` like '%2016年分数线%'");
      $article_last_year=M()->query("select * from __PREFIX__article_xueli where `keywords` like '%历年分数线%'");

      $this->assign('province',$province);
      $this->assign('second_column',$second_column);
      $this->assign('third_column',$third_column);
      $this->assign('article_official',$article_official);
      $this->assign('article_this_year',$article_this_year);
      $this->assign('article_last_year',$article_last_year);
      $this->display();
    }

    public function high_starting_subject(){
      if(isset($_GET['id']) && isset($_GET['od']) && $_GET['id'] != '' && $_GET['od'] != ''){
        if($_GET['id'] == 19 && $_GET['od'] == 1){
          $third_column_id=19;
          $fourth_column_id=17;
        }elseif ($_GET['id'] == 19 && $_GET['od'] == 2) {
          $third_column_id=19;
          $fourth_column_id=18;
        }elseif ($_GET['id'] == 19 && $_GET['od'] == 3) {
          $third_column_id=19;
          $fourth_column_id=19;
        }elseif ($_GET['id'] == 19 && $_GET['od'] == 4) {
          $third_column_id=19;
          $fourth_column_id=20;
        }elseif ($_GET['id'] == 20 && $_GET['od'] == 1) {
          $third_column_id=20;
          $fourth_column_id=21;
        }elseif ($_GET['id'] == 20 && $_GET['od'] == 2) {
          $third_column_id=20;
          $fourth_column_id=22;
        }elseif ($_GET['id'] == 20 && $_GET['od'] == 3) {
          $third_column_id=20;
          $fourth_column_id=23;
        }elseif ($_GET['id'] == 20 && $_GET['od'] == 4) {
          $third_column_id=20;
          $fourth_column_id=24;
        }elseif ($_GET['id'] == 21 && $_GET['od'] == 1) {
          $third_column_id=21;
          $fourth_column_id=25;
        }elseif ($_GET['id'] == 21 && $_GET['od'] == 2) {
          $third_column_id=21;
          $fourth_column_id=26;
        }elseif ($_GET['id'] == 21 && $_GET['od'] == 3) {
          $third_column_id=21;
          $fourth_column_id=27;
        }elseif ($_GET['id'] == 21 && $_GET['od'] == 4) {
          $third_column_id=21;
          $fourth_column_id=28;
        }elseif ($_GET['id'] == 22 && $_GET['od'] == 1) {
          $third_column_id=22;
          $fourth_column_id=29;
        }elseif ($_GET['id'] == 22 && $_GET['od'] == 2) {
          $third_column_id=22;
          $fourth_column_id=30;
        }elseif ($_GET['id'] == 22 && $_GET['od'] == 3) {
          $third_column_id=22;
          $fourth_column_id=31;
        }elseif ($_GET['id'] == 22 && $_GET['od'] == 4) {
          $third_column_id=22;
          $fourth_column_id=32;
        }elseif ($_GET['id'] == 23 && $_GET['od'] == 1) {
          $third_column_id=23;
          $fourth_column_id=33;
        }elseif ($_GET['id'] == 23 && $_GET['od'] == 2) {
          $third_column_id=23;
          $fourth_column_id=34;
        }elseif ($_GET['id'] == 23 && $_GET['od'] == 3) {
          $third_column_id=23;
          $fourth_column_id=35;
        }elseif ($_GET['id'] == 23 && $_GET['od'] == 4) {
          $third_column_id=23;
          $fourth_column_id=36;
        }elseif ($_GET['id'] == 24 && $_GET['od'] == 1) {
          $third_column_id=24;
          $fourth_column_id=37;
        }elseif ($_GET['id'] == 24 && $_GET['od'] == 2) {
          $third_column_id=24;
          $fourth_column_id=38;
        }elseif ($_GET['id'] == 24 && $_GET['od'] == 3) {
          $third_column_id=24;
          $fourth_column_id=39;
        }elseif ($_GET['id'] == 24 && $_GET['od'] == 4) {
          $third_column_id=24;
          $fourth_column_id=40;
        }
        $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");
        $fourth_column_name=M()->query("select * from __PREFIX__fourth_column where `id` = '$fourth_column_id'");

        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
        $size = empty($_REQUEST['size']) ? 40 : $_REQUEST['size'];
        $where = " 1 = 1 ";
        $where.=" and `fourth_column_id` = '$fourth_column_id' and `display` = '1'";
        $article=M('article_xueli');
        $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
        $count = $article->where($where)->count();
        $pager = new \Think\Page($count,$size);
        $page = $pager->show();

        $right_two=$article->query("select * from __PREFIX__article_xueli where `third_column_id` = '1' order by `order`,`id` desc limit 10");

        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('right_two',$right_two);
        $this->assign('page',$page);
        $this->assign('article_main',$res);
        $this->assign('third_column_name',$third_column_name);
        $this->assign('fourth_column_name',$fourth_column_name);
        $this->display();
      }else{
        echo "getting information failure"."<br/>";
      }
    }

    public function high_starting(){
      $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
      $province = M()->query($sql1);
      $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $second_column = M()->query($sql2);
      $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $third_column = M()->query($sql3);

      $article=M('article_xueli');
      $article_one_chinese = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 17 order by `order`,`id` limit 10");
      $article_two_chinese = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 18 order by `order`,`id` limit 10");
      $article_three_chinese = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 19 order by `order`,`id` limit 5");
      $article_four_chinese = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 20 order by `order`,`id` limit 5");

      $article_one_english = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 21 order by `order`,`id` limit 10");
      $article_two_english = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 22 order by `order`,`id` limit 10");
      $article_three_english = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 23 order by `order`,`id` limit 5");
      $article_four_english = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 24 order by `order`,`id` limit 5");

      $article_one_math = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 25 order by `order`,`id` limit 10");
      $article_two_math = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 26 order by `order`,`id` limit 10");
      $article_three_math = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 27 order by `order`,`id` limit 5");
      $article_four_math = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 28 order by `order`,`id` limit 5");

      $article_one_wuhua = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 29 order by `order`,`id` limit 10");
      $article_two_wuhua = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 30 order by `order`,`id` limit 10");
      $article_three_wuhua = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 31 order by `order`,`id` limit 5");
      $article_four_wuhua = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 32 order by `order`,`id` limit 5");

      $article_one_shidi = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 33 order by `order`,`id` limit 10");
      $article_two_shidi = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 34 order by `order`,`id` limit 10");
      $article_three_shidi = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 35 order by `order`,`id` limit 5");
      $article_four_shidi = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 36 order by `order`,`id` limit 5");

      $article_one_eri = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 37 order by `order`,`id` limit 10");
      $article_two_eri = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 38 order by `order`,`id` limit 10");
      $article_three_eri = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 39 order by `order`,`id` limit 5");
      $article_four_eri = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 40 order by `order`,`id` limit 5");


      $this->assign('province',$province);
      $this->assign('second_column',$second_column);
      $this->assign('third_column',$third_column);
      $this->assign('article_one',$article_one);
      $this->assign('article_two',$article_two);
      $this->assign('article_three',$article_three);
      $this->assign('article_four',$article_four);

      $this->assign('article_one_chinese',$article_one_chinese);
      $this->assign('article_two_chinese',$article_two_chinese);
      $this->assign('article_three_chinese',$article_three_chinese);
      $this->assign('article_four_chinese',$article_four_chinese);
      $this->assign('article_one_english',$article_one_english);
      $this->assign('article_two_english',$article_two_english);
      $this->assign('article_three_english',$article_three_english);
      $this->assign('article_four_english',$article_four_english);
      $this->assign('article_one_math',$article_one_math);
      $this->assign('article_two_math',$article_two_math);
      $this->assign('article_three_math',$article_three_math);
      $this->assign('article_four_math',$article_four_math);
      $this->assign('article_one_wuhua',$article_one_wuhua);
      $this->assign('article_two_wuhua',$article_two_wuhua);
      $this->assign('article_three_wuhua',$article_three_wuhua);
      $this->assign('article_four_wuhua',$article_four_wuhua);
      $this->assign('article_one_shidi',$article_one_shidi);
      $this->assign('article_two_shidi',$article_two_shidi);
      $this->assign('article_three_shidi',$article_three_shidi);
      $this->assign('article_four_shidi',$article_four_shidi);
      $this->assign('article_one_eri',$article_one_eri);
      $this->assign('article_two_eri',$article_two_eri);
      $this->assign('article_three_eri',$article_three_eri);
      $this->assign('article_four_eri',$article_four_eri);
      $this->display();
    }

    //zhuanshengben
    public function upgraded_subject(){
      if(isset($_GET['id']) && isset($_GET['od']) && $_GET['id'] != '' && $_GET['od'] != ''){
        if($_GET['id'] == 25 && $_GET['od'] == 1){
          $third_column_id=25;
          $fourth_column_id=41;
        }elseif ($_GET['id'] == 25 && $_GET['od'] == 2) {
          $third_column_id=25;
          $fourth_column_id=42;
        }elseif ($_GET['id'] == 25 && $_GET['od'] == 3) {
          $third_column_id=25;
          $fourth_column_id=43;
        }elseif ($_GET['id'] == 25 && $_GET['od'] == 4) {
          $third_column_id=25;
          $fourth_column_id=44;
        }elseif ($_GET['id'] == 26 && $_GET['od'] == 1) {
          $third_column_id=26;
          $fourth_column_id=45;
        }elseif ($_GET['id'] == 26 && $_GET['od'] == 2) {
          $third_column_id=26;
          $fourth_column_id=46;
        }elseif ($_GET['id'] == 26 && $_GET['od'] == 3) {
          $third_column_id=26;
          $fourth_column_id=47;
        }elseif ($_GET['id'] == 26 && $_GET['od'] == 4) {
          $third_column_id=26;
          $fourth_column_id=48;
        }elseif ($_GET['id'] == 27 && $_GET['od'] == 1) {
          $third_column_id=27;
          $fourth_column_id=49;
        }elseif ($_GET['id'] == 27 && $_GET['od'] == 2) {
          $third_column_id=27;
          $fourth_column_id=50;
        }elseif ($_GET['id'] == 27 && $_GET['od'] == 3) {
          $third_column_id=27;
          $fourth_column_id=51;
        }elseif ($_GET['id'] == 27 && $_GET['od'] == 4) {
          $third_column_id=27;
          $fourth_column_id=52;
        }elseif ($_GET['id'] == 28 && $_GET['od'] == 1) {
          $third_column_id=28;
          $fourth_column_id=53;
        }elseif ($_GET['id'] == 28 && $_GET['od'] == 2) {
          $third_column_id=28;
          $fourth_column_id=54;
        }elseif ($_GET['id'] == 28 && $_GET['od'] == 3) {
          $third_column_id=28;
          $fourth_column_id=55;
        }elseif ($_GET['id'] == 28 && $_GET['od'] == 4) {
          $third_column_id=28;
          $fourth_column_id=56;
        }elseif ($_GET['id'] == 29 && $_GET['od'] == 1) {
          $third_column_id=29;
          $fourth_column_id=57;
        }elseif ($_GET['id'] == 29 && $_GET['od'] == 2) {
          $third_column_id=29;
          $fourth_column_id=58;
        }elseif ($_GET['id'] == 29 && $_GET['od'] == 3) {
          $third_column_id=29;
          $fourth_column_id=59;
        }elseif ($_GET['id'] == 29 && $_GET['od'] == 4) {
          $third_column_id=29;
          $fourth_column_id=60;
        }elseif ($_GET['id'] == 30 && $_GET['od'] == 1) {
          $third_column_id=30;
          $fourth_column_id=61;
        }elseif ($_GET['id'] == 30 && $_GET['od'] == 2) {
          $third_column_id=30;
          $fourth_column_id=62;
        }elseif ($_GET['id'] == 30 && $_GET['od'] == 3) {
          $third_column_id=30;
          $fourth_column_id=63;
        }elseif ($_GET['id'] == 30 && $_GET['od'] == 4) {
          $third_column_id=30;
          $fourth_column_id=64;
        }elseif ($_GET['id'] == 31 && $_GET['od'] == 1) {
          $third_column_id=31;
          $fourth_column_id=65;
        }elseif ($_GET['id'] == 31 && $_GET['od'] == 2) {
          $third_column_id=31;
          $fourth_column_id=66;
        }elseif ($_GET['id'] == 31 && $_GET['od'] == 3) {
          $third_column_id=31;
          $fourth_column_id=67;
        }elseif ($_GET['id'] == 31 && $_GET['od'] == 4) {
          $third_column_id=31;
          $fourth_column_id=68;
        }elseif ($_GET['id'] == 32 && $_GET['od'] == 1) {
          $third_column_id=32;
          $fourth_column_id=69;
        }elseif ($_GET['id'] == 32 && $_GET['od'] == 2) {
          $third_column_id=32;
          $fourth_column_id=70;
        }elseif ($_GET['id'] == 32 && $_GET['od'] == 3) {
          $third_column_id=32;
          $fourth_column_id=71;
        }elseif ($_GET['id'] == 32 && $_GET['od'] == 4) {
          $third_column_id=32;
          $fourth_column_id=72;
        }elseif ($_GET['id'] == 33 && $_GET['od'] == 1) {
          $third_column_id=33;
          $fourth_column_id=73;
        }elseif ($_GET['id'] == 33 && $_GET['od'] == 2) {
          $third_column_id=33;
          $fourth_column_id=74;
        }elseif ($_GET['id'] == 33 && $_GET['od'] == 3) {
          $third_column_id=33;
          $fourth_column_id=75;
        }elseif ($_GET['id'] == 33 && $_GET['od'] == 4) {
          $third_column_id=33;
          $fourth_column_id=76;
        }
        $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");
        $fourth_column_name=M()->query("select * from __PREFIX__fourth_column where `id` = '$fourth_column_id'");

        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
        $size = empty($_REQUEST['size']) ? 40 : $_REQUEST['size'];
        $where = " 1 = 1 ";
        $where.=" and `fourth_column_id` = '$fourth_column_id' and `display` = '1'";
        $article=M('article_xueli');
        $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
        $count = $article->where($where)->count();
        $pager = new \Think\Page($count,$size);
        $page = $pager->show();

        $right_two=$article->query("select * from __PREFIX__article_xueli where `third_column_id` = '1' order by `order`,`id` desc limit 10");

        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('right_two',$right_two);
        $this->assign('page',$page);
        $this->assign('article_main',$res);
        $this->assign('third_column_name',$third_column_name);
        $this->assign('fourth_column_name',$fourth_column_name);
        $this->display();
      }else{
        echo "getting information failure"."<br/>";
      }
    }
    //zhuangshengben shouye
    public function upgraded(){
      $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
      $province = M()->query($sql1);
      $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $second_column = M()->query($sql2);
      $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $third_column = M()->query($sql3);

      $article=M('article_xueli');
      $article_one_chinese = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 41 order by `order`,`id` limit 10");
      $article_two_chinese = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 42 order by `order`,`id` limit 10");
      $article_three_chinese = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 43 order by `order`,`id` limit 5");
      $article_four_chinese = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 44 order by `order`,`id` limit 5");

      $article_one_english = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 45 order by `order`,`id` limit 10");
      $article_two_english = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 46 order by `order`,`id` limit 10");
      $article_three_english = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 47 order by `order`,`id` limit 5");
      $article_four_english = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 48 order by `order`,`id` limit 5");

      $article_one_math = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 49 order by `order`,`id` limit 10");
      $article_two_math = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 50 order by `order`,`id` limit 10");
      $article_three_math = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 51 order by `order`,`id` limit 5");
      $article_four_math = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 52 order by `order`,`id` limit 5");

      $article_one_politics = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 53 order by `order`,`id` limit 10");
      $article_two_politics = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 54 order by `order`,`id` limit 10");
      $article_three_politics = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 55 order by `order`,`id` limit 5");
      $article_four_politics = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 56 order by `order`,`id` limit 5");

      $article_one_art = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 57 order by `order`,`id` limit 10");
      $article_two_art = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 58 order by `order`,`id` limit 10");
      $article_three_art = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 59 order by `order`,`id` limit 5");
      $article_four_art = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 60 order by `order`,`id` limit 5");

      $article_one_ecology = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 61 order by `order`,`id` limit 10");
      $article_two_ecology = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 62 order by `order`,`id` limit 10");
      $article_three_ecology = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 63 order by `order`,`id` limit 5");
      $article_four_ecology = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 64 order by `order`,`id` limit 5");

      $article_one_civillaw = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 65 order by `order`,`id` limit 10");
      $article_two_civillaw = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 66 order by `order`,`id` limit 10");
      $article_three_civillaw = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 67 order by `order`,`id` limit 5");
      $article_four_civillaw = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 68 order by `order`,`id` limit 5");

      $article_one_education = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 69 order by `order`,`id` limit 10");
      $article_two_education = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 70 order by `order`,`id` limit 10");
      $article_three_education = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 71 order by `order`,`id` limit 5");
      $article_four_education = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 72 order by `order`,`id` limit 5");

      $article_one_medical = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 73 order by `order`,`id` limit 10");
      $article_two_medical = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 74 order by `order`,`id` limit 10");
      $article_three_medical = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 75 order by `order`,`id` limit 5");
      $article_four_medical = $article->query("select * from __PREFIX__article_xueli where `fourth_column_id` = 76 order by `order`,`id` limit 5");


      $this->assign('province',$province);
      $this->assign('second_column',$second_column);
      $this->assign('third_column',$third_column);

      $this->assign('article_one_chinese',$article_one_chinese);
      $this->assign('article_two_chinese',$article_two_chinese);
      $this->assign('article_three_chinese',$article_three_chinese);
      $this->assign('article_four_chinese',$article_four_chinese);

      $this->assign('article_one_english',$article_one_english);
      $this->assign('article_two_english',$article_two_english);
      $this->assign('article_three_english',$article_three_english);
      $this->assign('article_four_english',$article_four_english);

      $this->assign('article_one_math',$article_one_math);
      $this->assign('article_two_math',$article_two_math);
      $this->assign('article_three_math',$article_three_math);
      $this->assign('article_four_math',$article_four_math);

      $this->assign('article_one_politics',$article_one_politics);
      $this->assign('article_two_politics',$article_two_politics);
      $this->assign('article_three_politics',$article_three_politics);
      $this->assign('article_four_politics',$article_four_politics);

      $this->assign('article_one_art',$article_one_art);
      $this->assign('article_two_art',$article_two_art);
      $this->assign('article_three_art',$article_three_art);
      $this->assign('article_four_art',$article_four_art);

      $this->assign('article_one_ecology',$article_one_ecology);
      $this->assign('article_two_ecology',$article_two_ecology);
      $this->assign('article_three_ecology',$article_three_ecology);
      $this->assign('article_four_ecology',$article_four_ecology);

      $this->assign('article_one_civillaw',$article_one_civillaw);
      $this->assign('article_two_civillaw',$article_two_civillaw);
      $this->assign('article_three_civillaw',$article_three_civillaw);
      $this->assign('article_four_civillaw',$article_four_civillaw);

      $this->assign('article_one_education',$article_one_education);
      $this->assign('article_two_education',$article_two_education);
      $this->assign('article_three_education',$article_three_education);
      $this->assign('article_four_education',$article_four_education);

      $this->assign('article_one_medical',$article_one_medical);
      $this->assign('article_two_medical',$article_two_medical);
      $this->assign('article_three_medical',$article_three_medical);
      $this->assign('article_four_medical',$article_four_medical);
      $this->display();
    }

    public function hot_news(){
      if(isset($_GET['id']) && $_GET['id'] != ''){
        $third_column_id=$_GET['id'];

        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
        $size = empty($_REQUEST['size']) ? 10 : $_REQUEST['size'];
        $where = " 1 = 1 ";
        $where.=" and `third_column_id` = '$third_column_id' and `display` = '1'";
        $article=M('article_xueli');
        $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
        $count = $article->where($where)->count();
        $pager = new \Think\Page($count,$size);
        $page = $pager->show();
        $right_two=$article->query("select * from __PREFIX__article_xueli where `third_column_id` = '1' order by `order`,`id` desc limit 10");

        $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");

        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('page',$page);
        $this->assign('article_main',$res);
        $this->assign('right_two',$right_two);
        $this->assign('third_column_name',$third_column_name);
        $this->display();
      }else{
        echo "getting information failure"."<br/>";
      }
    }

    public function news_list(){
      $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
      $province = M()->query($sql1);
      $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $second_column = M()->query($sql2);
      $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
      $third_column = M()->query($sql3);

      $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
      $size = empty($_REQUEST['size']) ? 40 : $_REQUEST['size'];
      $where = " 1 = 1 ";
      $where.=" and `second_column_id` = 1 and `display` = '1'";
      $article=M('article_xueli');
      $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
      $count = $article->where($where)->count();
      $pager = new \Think\Page($count,$size);
      $page = $pager->show();
      $right_two=$article->query("select * from __PREFIX__article_xueli where `third_column_id` = '1' order by `order`,`id` desc limit 10");


      $this->assign('province',$province);
      $this->assign('second_column',$second_column);
      $this->assign('third_column',$third_column);
      $this->assign('page',$page);
      $this->assign('article_main',$res);
      $this->assign('right_two',$right_two);
      $this->display();
    }

    public function news_list_subject(){
      if(isset($_GET['id']) && $_GET['id'] != ''){
        $third_column_id=$_GET['id'];

        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");

        $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
        $size = empty($_REQUEST['size']) ? 40 : $_REQUEST['size'];
        $where = " 1 = 1 ";
        $where.=" and `third_column_id` = '$third_column_id' and `display` = '1'";
        $article=M('article_xueli');
        $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
        $count = $article->where($where)->count();
        $pager = new \Think\Page($count,$size);
        $page = $pager->show();
        $right_two=$article->query("select * from __PREFIX__article_xueli where `third_column_id` = '1' order by `order`,`id` desc limit 10");


        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('page',$page);
        $this->assign('article_main',$res);
        $this->assign('right_two',$right_two);
        $this->assign('third_column_name',$third_column_name);
        $this->display();
      }else{
        echo "getting information failure"."<br/>";
      }
    }

    public function recruit_students_school(){
      if(isset($_GET['id']) && $_GET['id'] != ''){
        $third_column_id=$_GET['id'];

        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");

        $article=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = '$third_column_id' and `display` = 1");

        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('third_column_name',$third_column_name);
        $this->assign('article',$article);
        $this->display();
      }else{
        echo "getting information failure"."<br/>";
      }
    }

    public function recruit_students_subject(){
        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $management_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 5 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $management_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 5 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $management_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 5 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $management_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 5 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $management_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 5 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $literature_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 6 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $literature_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 6 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $literature_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 6 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $literature_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 6 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $literature_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 6 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $polytechnic_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 7 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $polytechnic_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 7 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $polytechnic_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 7 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $polytechnic_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 7 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $polytechnic_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 7 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $education_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 8 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $education_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 8 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $education_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 8 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $education_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 8 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $education_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 8 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $medicine_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 9 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $medicine_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 9 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $medicine_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 9 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $medicine_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 9 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $medicine_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 9 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $agronomy_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 10 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $agronomy_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 10 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $agronomy_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 10 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $agronomy_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 10 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $agronomy_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 10 and `display` =1 order by `order`,`id` desc limit 24,6 ");

        $ary_one=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 11 and `display` =1 order by `order`,`id` desc limit 0,6 ");
        $ary_two=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 11 and `display` =1 order by `order`,`id` desc limit 6,6 ");
        $ary_three=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 11 and `display` =1 order by `order`,`id` desc limit 12,6 ");
        $ary_four=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 11 and `display` =1 order by `order`,`id` desc limit 18,6 ");
        $ary_five=M()->query("select * from __PREFIX__article_xueli where `third_column_id` = 11 and `display` =1 order by `order`,`id` desc limit 24,6 ");


        $this->assign('management_one',$management_one);
        $this->assign('management_two',$management_two);
        $this->assign('management_three',$management_three);
        $this->assign('management_four',$management_four);
        $this->assign('management_five',$management_five);

        $this->assign('literature_one',$literature_one);
        $this->assign('literature_two',$literature_two);
        $this->assign('literature_three',$literature_three);
        $this->assign('literature_four',$literature_four);
        $this->assign('literature_five',$literature_five);

        $this->assign('polytechnic_one',$polytechnic_one);
        $this->assign('polytechnic_two',$polytechnic_two);
        $this->assign('polytechnic_three',$polytechnic_three);
        $this->assign('polytechnic_four',$polytechnic_four);
        $this->assign('polytechnic_five',$polytechnic_five);

        $this->assign('education_one',$education_one);
        $this->assign('education_two',$education_two);
        $this->assign('education_three',$education_three);
        $this->assign('education_four',$education_four);
        $this->assign('education_five',$education_five);

        $this->assign('medicine_one',$medicine_one);
        $this->assign('medicine_two',$medicine_two);
        $this->assign('medicine_three',$medicine_three);
        $this->assign('medicine_four',$medicine_four);
        $this->assign('medicine_five',$medicine_five);

        $this->assign('agronomy_one',$agronomy_one);
        $this->assign('agronomy_two',$agronomy_two);
        $this->assign('agronomy_three',$agronomy_three);
        $this->assign('agronomy_four',$agronomy_four);
        $this->assign('agronomy_five',$agronomy_five);

        $this->assign('ary_one',$ary_one);
        $this->assign('ary_two',$ary_two);
        $this->assign('ary_three',$ary_three);
        $this->assign('ary_four',$ary_four);
        $this->assign('ary_five',$ary_five);

        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->display();
    }

    public function region_news(){
      if(isset($_GET['id']) && $_GET['id'] !=''){
        $province_id=$_GET['id'];
        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $hot_news=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 1 and `display` = 1 and `province_id`='$province_id' order by `order`,`id` desc limit 5");
        $recruit_school=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 2 and `display` = 1 and `province_id`='$province_id' order by `order`,`id` desc limit 5");
        $recruit_info=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 3 and `display` = 1 and `province_id`='$province_id' order by `order`,`id` desc limit 5");
        $exam_guide=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 4 and `display` = 1 and `province_id`='$province_id' order by `order`,`id` desc limit 5");
        $high_starting=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 5 and `display` = 1 and `province_id`='$province_id' order by `order`,`id` desc limit 5");
        $upgraded=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 6 and `display` = 1 and `province_id`='$province_id' order by `order`,`id` desc limit 5");
        $experience=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 7 and `display` = 1 and `province_id`='$province_id' order by `order`,`id` desc limit 5");
        $special=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 8 and `display` = 1 and `province_id`='$province_id' order by `order`,`id` desc limit 5");
        $online_exam=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 9 and `display` = 1 and `province_id`='$province_id' order by `order`,`id` desc limit 5");
        $net_class=M()->query("select * from __PREFIX__article_xueli where `second_column_id` = 10 and `display` = 1 and `province_id`='$province_id' order by `order`,`id` desc limit 5");

        $province_name=M()->query("select * from __PREFIX__region2 where `id` = '$province_id'");

        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('hot_news',$hot_news);
        $this->assign('recruit_school',$recruit_school);
        $this->assign('recruit_info',$recruit_info);
        $this->assign('exam_guide',$exam_guide);
        $this->assign('high_starting',$high_starting);
        $this->assign('upgraded',$upgraded);
        $this->assign('experience',$experience);
        $this->assign('special',$special);
        $this->assign('online_exam',$online_exam);
        $this->assign('net_class',$net_class);
        $this->assign('province_name',$province_name);
        $this->display();
      }else{
        echo "getting information failure"."<br/>";
      }
    }

    public function guide_fourth(){
      if(isset($_GET['id']) && $_GET['id'] !=''){
        $fourth_column_id=$_GET['id'];
        $sql1 = "select * from __PREFIX__region2 where `level` = 1 limit 32";
        $province = M()->query($sql1);
        $sql2 = "select * from __PREFIX__second_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $second_column = M()->query($sql2);
        $sql3 = "select * from __PREFIX__third_column where `first_column_id` = 1 and `display` = 1 order by `order` desc";
        $third_column = M()->query($sql3);

        $fourth_column_name=M()->query("select * from __PREFIX__fourth_column where `id` = '$fourth_column_id'");
        $third_column_id=$fourth_column_name[0]['third_column_id'];
        $third_column_name=M()->query("select * from __PREFIX__third_column where `id` = '$third_column_id'");

        $p = empty($_REQUEST['p']) ? 1 : $_REQUEST['p'];
        $size = empty($_REQUEST['size']) ? 40 : $_REQUEST['size'];
        $where = " 1 = 1 ";
        $where.=" and `fourth_column_id` = '$fourth_column_id' and `display` = '1'";
        $article=M('article_xueli');
        $res = $article->where($where)->order('`order` desc,`id` desc')->page("$p,$size")->select();
        $count = $article->where($where)->count();
        $pager = new \Think\Page($count,$size);
        $page = $pager->show();

        $this->assign('page',$page);
        $this->assign('article_main',$res);
        $this->assign('province',$province);
        $this->assign('second_column',$second_column);
        $this->assign('third_column',$third_column);
        $this->assign('fourth_column_name',$fourth_column_name);
        $this->assign('third_column_name',$third_column_name);
        $this->display();
      }else{
        echo "getting information failure"."<br/>";
      }
    }

    // 二维码
    public function qr_code(){
        // 导入Vendor类库包 Library/Vendor/Zend/Server.class.php
        //http://www.tp-shop.cn/Home/Index/erweima/data/www.99soubao.com
         require_once 'ThinkPHP/Library/Vendor/phpqrcode/phpqrcode.php';
          //import('Vendor.phpqrcode.phpqrcode');
            error_reporting(E_ERROR);
            $url = urldecode($_GET["data"]);
            \QRcode::png($url);
    }

    // 验证码
    public function verify()
    {
        //验证码类型
        $type = I('get.type') ? I('get.type') : '';
        $fontSize = I('get.fontSize') ? I('get.fontSize') : '40';
        $length = I('get.length') ? I('get.length') : '4';

        $config = array(
            'fontSize' => $fontSize,
            'length' => $length,
            'useCurve' => true,
            'useNoise' => false,
        );
        $Verify = new Verify($config);
        $Verify->entry($type);
    }
}
